#ifndef READTHREAD_H
#define READTHREAD_H

#include <QThread>
#include <QTcpSocket>
#include "database.h"
#include "passData.h"

const QString versionServer = "v0.88";

class readThread : public QThread
{
	Q_OBJECT

public:
	readThread(QTcpSocket * tcpSocket, passData *passwordData, database *data, QObject *parent);
	~readThread();

	passData *passwordData;
	database *data;
	QTcpSocket *tcpSocket;
	QDataStream in;

	void run();

private:
	void checkPassword();
	void addRecord();
	void sendListForOperator();
	void sendOldRecord();
	void updateUsers();
};

#endif // READTHREAD_H
